@extends('admin::layouts.app')

@section('content')
    <div class="container">
        <div class="card">
            <div class="card-header">
                <h3 style="float: left;">话题列表</h3>
            </div>
            <div class="card-body">
                <table class="table">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>内容</th>
                        <th>作者</th>
                        <th>话题</th>
                        <th>管理</th>
                    </tr>
                    </thead>
                    <tbody>
                        @if($replies->count())
                            @foreach($replies as $v)
                                <tr>
                                    <td>{{$v->id}}</td>
                                    <td>{{$v->name}}</td>
                                    <td>{{\gl\clear_str_ellipsis($v->content,100)}}</td>
                                    <td>{{$v->user->name}}</td>
                                    <td>{{$v->topic->title}}</td>
                                </tr>
                            @endforeach
                        @endif
                    </tbody>
                </table>
                @if($replies->count())
                    <div class="pagination">
                        <li class="page-item">共{{$replies->total()}}条记录</li> &nbsp;{{$replies->links()}}
                    </div>
                @endif
            </div>
        </div>
    </div>
@endsection

@section('scripts')
    <script>
        new Vue({
            el:'#app',
            mounted() {

            },
            data() {
                return {

                }
            },
            methods:{

            }
        });
    </script>
@endsection
